package game.players.cpu.opponent;

import com.uqbar.vainilla.appearances.Sprite;

import game.players.SoccerPlayer;

public class WithBallStationaryCPUOpp extends WithBallAbstractMovingCPUOpp {

	public WithBallStationaryCPUOpp(SoccerPlayer player) {
		super(player, 0, 0);
		this.getPlayer().setAppearance(Sprite.fromImage("/images/goal3_caminando3.png").crop(0, 1, 34, 65).scale(1.5).flipHorizontally());
		this.getSoccerBall().locateBall(this.getPlayer().getX() - this.getSoccerBall().getX() - this.getSoccerBall().getRatio(), 0);
	}

	@Override
	public boolean isRight() {
		return false;
	}

	@Override
	public void loseTheBall() {
		this.getPlayer().setState(new BeatenCPUOppPlayer(this.getPlayer(), this.isRight()));
	}

}
